package com.example.studyFile.asynchronousOptimization;

public class ValidationExecutor3 {


    public static void main(String[] args) {
        try {
            checkBusinessRankLogApp(1);
        } catch (Exception e) {
            // 获取异常的原始消息
            String originalMessage = e.getMessage();
            System.out.println("e = " + originalMessage);

            // 构造新的异常并抛出
            throw new BusinessException(originalMessage);
        }
    }

    private static void checkBusinessRankLogApp(int id) {
        try {
            Thread.sleep(3000);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }

        throw new BusinessException("Validation failed123123");
    }



}
